]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Wait for startup completion before running perf script
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 5 Mar 2019 18:31:01 +0000 (19:31 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Thu, 21 Mar 2019 10:18:02 +0000 (10:18 +0000)
The scripts generally assume a functional shell, so wait until
that is the case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/440

js/ui/main.js

index f9556f14dee7a898d0ea552259733ff5d93fc40f..061303cf36448475d7842bb2d6dd4cc34d1377bb 100644 (file)
@@ -211,13 +211,6 @@ function _initializeUI() {
 
     _startDate = new Date();
 
-    let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
-    if (perfModuleName) {
-        let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
-        let module = eval('imports.perf.' + perfModuleName + ';');
-        Scripting.runPerfScript(module, perfOutput);
-    }
-
     ExtensionDownloader.init();
     ExtensionSystem.init();
 
@@ -239,6 +232,13 @@ function _initializeUI() {
             Shell.Global.log_structured('GNOME Shell started at ' + _startDate,
                                         ['MESSAGE_ID=' + GNOMESHELL_STARTED_MESSAGE_ID]);
         }
+
+        let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
+        if (perfModuleName) {
+            let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
+            let module = eval('imports.perf.' + perfModuleName + ';');
+            Scripting.runPerfScript(module, perfOutput);
+        }
     });
 }